<?php
/*
<List Head Controller> 
Author: Naseer Ahmad
Date:   14-07-2011
Last Updated by:
Last Updated on:
*/

class listHeadsController extends appController
{
	function index()
	{
		
		$heads = $this -> listHeads -> _getArrayData("acountHeads", "*", "1=1 Order By entryDate DESC");
		$this->set("heads", $heads);
		
		$this->set("cmd", $this->data['cmd']);
		$this -> render('List Head Accounts');
	}
	
	function doDelete(){
		$where =array("accountID"	=> $this->data['id']);
		$this -> listHeads -> _XTable("acountHeads", $where);
		$rdArray=array("page"	=> 'listHeads',
					   "cmd"	=> "Account Head Deleted Successfully!");
		$this->redirect($rdArray);
	}
	
}
?>